﻿using System.Web.Mvc;
using Omu.AwesomeDemo.Infra.Dto;

namespace Omu.AwesomeDemo.WebUI.Controllers
{
    public class PopupFormDemoController : BaseController
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult AskName()
        {
            return View();
        }

        [HttpPost]
        public ActionResult AskName(PopupFormDemoInput input)
        {
            if (!ModelState.IsValid) return View(input);
            return Json(input);
        }

        //public ActionResult NewOrder()
        //{
        //    return View();
        //}

        //[HttpPost]
        //public ActionResult NewOrder(object o)
        //{
        //    return Content("ok");
        //}

        //public ActionResult Add()
        //{
        //    return View();
        //}

        //[HttpPost]
        //public ActionResult Add(string fname, string lname)
        //{
        //    return Json(new {fname, lname});
        //}
    }
}